Crate tracing_distributed

Source
Expand description

This crate provides:

  • TelemetryLayer, a generic tracing layer that handles publishing spans and events to arbitrary backends
  • Utilities for implementing distributed tracing for arbitrary backends

As a tracing layer, TelemetryLayer can be composed with other layers to provide stdout logging, filtering, etc.

This crate is primarily intended to be used by people implementing their own backends. A concrete implementation using honeycomb.io as a backend is available in the tracing-honeycomb crate.

Structs§

  • Telemetry implementation that does not publish information to any backend. For use in tests.
  • An Event holds ready-to-publish information derived from a tracing::Event.
  • A Span holds ready-to-publish information gathered during the lifetime of a tracing::Span.
  • A tracing_subscriber::Layer that publishes events and spans to some backend using the provided Telemetry capability.

Enums§

  • Errors that can occur while registering the current span as a distributed trace root or attempting to retrieve the current trace context.

Traits§

  • Represents the ability to publish events and spans to some arbitrary backend.

Functions§

  • Retrieve the distributed trace context associated with the current span. Returns the TraceId, if any, that the current span is associated with along with the SpanId belonging to the current span.
  • Register the current span as the local root of a distributed trace.